package com.whr.bean;

public class Resources implements Comparable<Resources>{
    private Integer rid;

    private String rname;

    private String rpath;

    private String rtype;

    private String rorder;

    private String rparent;

    private String rstate;

    private String ricon;

    public Integer getRid() {
        return rid;
    }

    public void setRid(Integer rid) {
        this.rid = rid;
    }

    public String getRname() {
        return rname;
    }

    public void setRname(String rname) {
        this.rname = rname == null ? null : rname.trim();
    }

    public String getRpath() {
        return rpath;
    }

    public void setRpath(String rpath) {
        this.rpath = rpath == null ? null : rpath.trim();
    }

    public String getRtype() {
        return rtype;
    }

    public void setRtype(String rtype) {
        this.rtype = rtype == null ? null : rtype.trim();
    }

    public String getRorder() {
        return rorder;
    }

    public void setRorder(String rorder) {
        this.rorder = rorder == null ? null : rorder.trim();
    }

    public String getRparent() {
        return rparent;
    }

    public void setRparent(String rparent) {
        this.rparent = rparent == null ? null : rparent.trim();
    }

    public String getRstate() {
        return rstate;
    }

    public void setRstate(String rstate) {
        this.rstate = rstate == null ? null : rstate.trim();
    }

    public String getRicon() {
        return ricon;
    }

    public void setRicon(String ricon) {
        this.ricon = ricon;
    }

    @Override
    public int compareTo(Resources o) {
        int sord = Integer.parseInt(this.getRorder());
        int tord = Integer.parseInt(o.getRorder());
        return sord - tord;
    }

    @Override
    public String toString() {
        return "Resources{" +
                "rid=" + rid +
                ", rname='" + rname + '\'' +
                ", rpath='" + rpath + '\'' +
                ", rtype='" + rtype + '\'' +
                ", rorder='" + rorder + '\'' +
                ", rparent='" + rparent + '\'' +
                ", rstate='" + rstate + '\'' +
                '}';
    }
}